<?
include_once "../../persistobject/userdesc.lib";
include_once "editlayout.lib";
include_once "userpub.lib";

$userDesc = new CUserDesc();

$editLayout = new CEditLayout($userDesc, getenv("DOCUMENT_ROOT")."/admin/user/layoutdesc/editlayoutdesc.xml", $_GET["ID"]);
$editLayout->editUrl = "useredit.php";
$editLayout->viewUrl = "userview.php";
$editLayout->listUrl = "userlist.php";

if ($_POST["process"])
	$editLayout->process();

$layoutFactory = new CLayoutFactoryAdmin();
$layoutFactory->setActiveTab("TM_2");
$layoutFactory->addSideBox(GetToolBox());
$content = $editLayout->layout();

$header = $layoutFactory->getHeader();
$tail = $layoutFactory->getTail();
$body = $layoutFactory->getBody($content);

echo $header.$body.$tail;
?>
